/*
 * =====================================================================================
 *
 *       Filename:  2.21.c
 *
 *    Description:  exp 2.21
 *
 *        Version:  1.0
 *        Created:  07/30/2010 08:17:49 AM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  bucunzai (), 
 *        Company:  bucunzai.info
 *
 * =====================================================================================
 */

#include	<stdlib.h>
#include	<stdio.h>


/* 
 * ===  FUNCTION  ======================================================================
 *         Name:  ful1
 *  Description:  
 * =====================================================================================
 */
   int 
fun1 ( unsigned word )
{
    return (int)((word<<24)>>24);
}		/* -----  end of function ful1  ----- */

/* 
 * ===  FUNCTION  ======================================================================
 *         Name:  fun2
 *  Description:  
 * =====================================================================================
 */
    int
fun2 ( unsigned word )
{
    return ((int)word<<24)>>24;
}		/* -----  end of function fun2  ----- */
/* 
 * ===  FUNCTION  ======================================================================
 *         Name:  main
 *  Description:  
 * =====================================================================================
 */
    int
main ( int argc, char *argv[] )
{
    int w=127;
    printf("%d,%d\n",fun1(w),fun2(w));
    w=w+1;
    printf("%d,%d\n",fun1(w),fun2(w));
    w=255;
    printf("%d,%d\n",fun1(w),fun2(w));
    w=w+1;
    printf("%d,%d\n",fun1(w),fun2(w));
    return EXIT_SUCCESS;
}				/* ----------  end of function main  ---------- */
